#!/bin/sh
# search MAC of HOST in LDAP
ldapsearch -x -h localhost -LLL -b "cn=Static,cn=192.168.0.0,cn=config,cn=master.lan,ou=DHCP,dc=ldap" "dhcpHWAddress=ethernet $1" cn | grep ^cn | gawk '{print $2}'